applying dropna resolves the bug but connects years that are not neig…#302
applying dropna resolves the bug but connects years that are not neig…#302remicousin wants to merge 1 commit intomasterfrom
Conversation
|
As we've discussed before, a line graph really isn't appropriate here, because drawing a line graph from discrete points involves interpolation between the points, and it's nonsensical to say that the onset in year 1991.5 is halfway between the 1991 onset and the 1992 onset. Plotly's current behavior in the presence of NaNs is clearly incorrect, but it's not clear to me that Ingrid's (or was it gnuplot's?) behavior (leaving blanks where there's no value) is the right way to handle it either. If interpolation is allowed between regularly spaced points on a continuum, why shouldn't it be allowed across irregularly spaced points too? Switching to a bar or scatter plot is not just a workaround, it's also the right way to plot this variable. Given that, I'm not sure it's worth my time to figure out the plotly bug. |
|
It's fine with me to move away from a line plot. But it also means we can't make line plots unless we are certain there is no missing value in the series to plot. |
That's true. Are there any graphs you think really should be line plots and have a possibility of containing missing values? |
|
Probably not in Maprooms that are well curated products, and/or where the problem can be dealt with by picking another visual or by controlling filling missing values. |



…hbors
The best way to see the bug and its "solution" is to run the app and change the default onset search month from November to September. Then:
dropna is applied to onset date graph and the persisting graph is not happening anymore. However we don't want to connect years that are not neighbor.
dropna is not applied to cessation but cessation doesn't have na so it behaves.
dropna is not applied to length and we can see the persisting graph from before the callback.
I found this conversation about it that led me to try getting rid of na.
I will have another PR use another kind of graphics so that we circumvent the bug for now.